/*
 * @Author: xujianxing
 * @Date: 2020-03-15 10:58:06
 * @LastEditors  : xujianxing
 * @LastEditTime : 2020-03-15 11:22:39
 * @Description: file content
 */

import { RECEIVE_CURRENT_SONG, SET_FULL_SCREEN } from "./types";
const defaultState = {
  currentSong: {},
  fullScreen: false,
  currentList: []
};
function player(state = defaultState, action) {
  switch (action.type) {
    case RECEIVE_CURRENT_SONG:
      return {
        ...state,
        currentSong: action.data
      };
    case SET_FULL_SCREEN:
      return {
        ...state,
        fullScreen: action.data
      };
    default:
      return state;
  }
}

export default player;
